Make ioemu targets more robust and make ioemu clean always succeed.
authorchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Tue, 25 Jul 2006 13:26:54 +0000 (14:26 +0100)
committerchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Tue, 25 Jul 2006 13:26:54 +0000 (14:26 +0100)
Based on a patch by: Alex Brett <Alex.Brett@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
tools/Makefile
tools/ioemu/Makefile
tools/ioemu/patches/xen-build

index 2a66e89c27b6350977ba58eb15be579e06a1408d..afcfb061536b0a7a42362eef7e0662412114a6a0 100644 (file)
@@ -62,11 +62,11 @@ check_clean:
 ifdef CONFIG_IOEMU
 export IOEMU_DIR ?= ioemu
 ioemu ioemuinstall:
-       [ -f $(IOEMU_DIR)/config-host.h ] || \
-       (cd $(IOEMU_DIR) && sh configure --prefix=/usr)
+       [ -f $(IOEMU_DIR)/config-host.mak ] || \
+         (cd $(IOEMU_DIR) && sh configure --prefix=/usr)
        $(MAKE) -C $(IOEMU_DIR) $(patsubst ioemu%,%,$@)
 ioemuclean:
-       [ ! -f $(IOEMU_DIR)/config-host.h ] || $(MAKE) -C $(IOEMU_DIR) clean
+       $(MAKE) -C $(IOEMU_DIR) distclean
 else
 ioemu ioemuinstall ioemuclean:
 endif
index e1c6bf894a26c4959480eb02582e3be4d0242ccf..a8625a152e6bcbb8970b462d4a3757a031db9e10 100644 (file)
@@ -1,7 +1,7 @@
 XEN_ROOT=../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-include config-host.mak
+-include config-host.mak
 
 CFLAGS+=-Wall -O2 -g -fno-strict-aliasing -I.
 ifdef CONFIG_DARWIN
@@ -37,7 +37,7 @@ clean:
        rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
        $(MAKE) -C tests clean
        for d in $(TARGET_DIRS); do \
-       $(MAKE) -C $$d $@ || exit 1 ; \
+       [ -d $$d ] && $(MAKE) -C $$d $@ || exit 0 ; \
         done
 
 distclean: clean
index 0816211eeac5af7ae80a3b39527757270636128c..4635c51e2640ee540812964d5b0d0d11fadd50b1 100644 (file)
@@ -1,14 +1,15 @@
 Index: ioemu/Makefile
 ===================================================================
---- ioemu.orig/Makefile        2006-07-12 10:39:09.278608692 +0100
-+++ ioemu/Makefile     2006-07-12 10:46:21.003128750 +0100
+--- ioemu.orig/Makefile        2006-07-25 14:18:33.163941149 +0100
++++ ioemu/Makefile     2006-07-25 14:24:31.695096861 +0100
 @@ -1,6 +1,9 @@
+-include config-host.mak
 +XEN_ROOT=../..
 +include $(XEN_ROOT)/tools/Rules.mk
-+
- include config-host.mak
  
 -CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I.
++-include config-host.mak
++
 +CFLAGS+=-Wall -O2 -g -fno-strict-aliasing -I.
  ifdef CONFIG_DARWIN
  CFLAGS+= -mdynamic-no-pic
@@ -22,6 +23,15 @@ Index: ioemu/Makefile
        for d in $(TARGET_DIRS); do \
        $(MAKE) -C $$d $@ || exit 1 ; \
          done
+@@ -34,7 +37,7 @@
+       rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
+       $(MAKE) -C tests clean
+       for d in $(TARGET_DIRS); do \
+-      $(MAKE) -C $$d $@ || exit 1 ; \
++      [ -d $$d ] && $(MAKE) -C $$d $@ || exit 0 ; \
+         done
+ distclean: clean
 @@ -57,12 +60,12 @@
  
  install: all $(if $(BUILD_DOCS),install-doc)
@@ -57,8 +67,8 @@ Index: ioemu/Makefile
  FILE=qemu-$(shell cat VERSION)
 Index: ioemu/Makefile.target
 ===================================================================
---- ioemu.orig/Makefile.target 2006-07-12 10:39:09.279608582 +0100
-+++ ioemu/Makefile.target      2006-07-12 11:32:51.034101952 +0100
+--- ioemu.orig/Makefile.target 2006-07-25 14:18:33.163941149 +0100
++++ ioemu/Makefile.target      2006-07-25 14:24:17.501562050 +0100
 @@ -1,5 +1,8 @@
  include config.mak
  
@@ -130,8 +140,8 @@ Index: ioemu/Makefile.target
  include .depend
 Index: ioemu/configure
 ===================================================================
---- ioemu.orig/configure       2006-07-12 10:39:09.280608472 +0100
-+++ ioemu/configure    2006-07-12 11:32:51.034101952 +0100
+--- ioemu.orig/configure       2006-07-25 14:18:33.163941149 +0100
++++ ioemu/configure    2006-07-25 14:24:17.501562050 +0100
 @@ -18,8 +18,8 @@
  
  # default parameters